import java.util.Stack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ken
 * Date: 2023-12-29
 * Time: 18:01
 */
public class Test {
    public static void main(String[] args) {
        Stack<Integer> stack = new<Integer> Stack();
        stack.push(1); //压栈
        stack.push(2);
        stack.push(3);
       Integer a = stack.pop();  //出栈
        System.out.println(a);
        System.out.println(stack.peek()); //偷看 不拿走
        System.out.println(stack.peek());
        System.out.println(stack.size());
    }
}